pub fn new_birthday_probability(n: u32) -> f64 {
    //1-A(n,365)/365^n; = 365!/(365-n)! /365^n
    let mut ans:f64 = 1.0;
    if n==0 { return 0.0; }
    if n>=100 { return 1.0; }

    for i in 0..365-n
    {
        let i_f = i as f64;
        ans = ans * (365.0 - i_f - (n as f64)) / (i_f+1.0);
        // println!("{}",ans);
    }

    for i in 0..n as i32
    {
        let i_f = i as f64;
        ans = ans * (365.0-i_f) / 365.0;
        // println!("{}",ans);
    }
    return 1.0-ans;
}